package com.findyou.entity;

import java.io.Serializable;
import java.util.List;

/**
 * @Title: User
 * @Author 贾金博
 * @Package com.findyou.entity
 * @Date 2024/10/17 上午10:42
 * @description: 用户类
 */
public class User implements Serializable  { // 注意序列化
    private Integer id;
    private String username;
    // 一个实体里面 表示的是多方关系
    private List<Orders> ordersList; // 当前用户具有的订单列表
    private List<Occupation> occupationList; // 职业 一个人可能有多个职业


    public User() {
    }

    public User(Integer id, String username, List<Orders> ordersList) {
        this.id = id;
        this.username = username;
        this.ordersList = ordersList;
    }

    public User(Integer id, String username, List<Orders> ordersList, List<Occupation> occupationList) {
        this.id = id;
        this.username = username;
        this.ordersList = ordersList;
        this.occupationList = occupationList;
    }

    /**
     * 获取
     * @return id
     */
    public Integer getId() {
        return id;
    }

    /**
     * 设置
     * @param id
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 获取
     * @return username
     */
    public String getUsername() {
        return username;
    }

    /**
     * 设置
     * @param username
     */
    public void setUsername(String username) {
        this.username = username;
    }

    /**
     * 获取
     * @return ordersList
     */
    public List<Orders> getOrdersList() {
        return ordersList;
    }

    /**
     * 设置
     * @param ordersList
     */
    public void setOrdersList(List<Orders> ordersList) {
        this.ordersList = ordersList;
    }

    /**
     * 获取
     * @return occupationList
     */
    public List<Occupation> getOccupationList() {
        return occupationList;
    }

    /**
     * 设置
     * @param occupationList
     */
    public void setOccupationList(List<Occupation> occupationList) {
        this.occupationList = occupationList;
    }

    public String toString() {
        return "User{id = " + id + ", username = " + username + ", ordersList = " + ordersList + ", occupationList = " + occupationList + "}";
    }

}
